<template>
  <div id="app">
    <router-view v-if="isRouterAlive" />
    <TabBar v-if="$route.meta.is_show"></TabBar>
  </div>
</template>

<script>
import TabBar from './components/TabBar.vue'

export default {
  components: { TabBar },
  name: 'App',
  comments: {
    TabBar
  },
  provide() {
    return {
      reload: this.reload
    }
  },
  data() {
    return {
      isRouterAlive: true
    }
  },
  methods: {
    reload() {
      this.isRouterAlive = false
      this.$nextTick(function () {
        this.isRouterAlive = true
      })
    }
  }
}
</script>

<style>
#app {
  font-family: '微软雅黑';
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
</style>
